package com.laijiale.dto;

import com.laijiale.constant.RE;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * @author laijiale
 * @date 2025年01月09日 9:25
 */


@Schema(name="用户登录DTo",description="通过手机验证码登录")
@Data
public class LoginByPhoneDTO implements Serializable, RE {
    @NotEmpty(message = "验证码不能为空")
    @Pattern(regexp = VCODE_RE, message = VCODE_RE_MSG)
    @Schema(description = "验证码")
    private String vcode;
    @NotEmpty(message = "手机号不能为空")
    @Pattern(regexp = PHONE_RE, message = PHONE_RE_MSG)
    @Schema(description = "手机号码")
    private String phone;
}
